﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nosc.ViewModel;
using System.Windows;

namespace Nosc.UI
{
    public class ShowWindows : IShowWindows
    {
        public void ShowAplication()
        {
            Application.Current.Dispatcher.BeginInvoke(new Action(() =>
            {
                UserLoginView login = new UserLoginView();
                login.Show();
                this.GetParetWindows().Close();
            }));
        }

        public SplashView GetParetWindows()
        {
            SplashView res = null;
            try
            {
                object query = Application.Current.Windows[0];
                res = query as SplashView;
            }
            catch (Exception)
            {
                ;
            }
            return res;
        }
    }
}
